

startday = new Date();
clockStart = startday.getTime();

function initStopwatch() {

    var myTime = new Date();

    return((myTime.getTime() - clockStart)/1000);
}

function getSecs() {

    var tSecs = Math.round(initStopwatch());
    var iSecs = tSecs % 60;
    var iMins = Math.round((tSecs-30)/60);
    var sSecs ="" + ((iSecs > 9) ? iSecs : "0" + iSecs);
    var sMins ="" + ((iMins > 9) ? iMins : "0" + iMins);

    var theForm;
    theForm = document.puzzle;
    //theForm.spendtime.value = 0;
    document.getElementById("timespent").value = sMins+":"+sSecs;
    window.setTimeout('getSecs()',1000);
    
}

function submit(){
    document.puzzle_level.submit();
}

function alertselected(selectobj){
var chosenoption=selectobj.options[selectobj.selectedIndex]
 //alert(chosenoption.value)
 
 document.puzzle_level.submit();
}
